#!/bin/bash

# This script just 
source ./envsetup

if [ ! -f $PATH_DISK_IMAGE ]; then
	echo "$PATH_DISK_IMAGE does not exist!"
	exit 1
fi

if [ ! -d $PATH_DISK_DIR ]; then
	mkdir -p $PATH_DISK_DIR
else
	sudo umount -f $PATH_DISK_DIR
	echo "$PATH_DISK_DIR is already mounted, umounted it."
fi

sudo mount -o loop $PATH_DISK_IMAGE $PATH_DISK_DIR
echo "$PATH_DISK_IMAGE has been mounted at $PATH_DISK_DIR."
echo "cd $PATH_DISK_DIR and browse the content of the disk"
